<?
session_start();
require_once("_mailing_libs.php");
check_session("/mailing/mailing_manager.php");

$id = $_GET["id"];

$mysqli = new mysqli("db.fittiche.com", "woodstock", "whoareyou", "woodstock_prototype");
if (mysqli_connect_errno()) {
	printf("Connect failed: %s\n", mysqli_connect_error());
	exit();
}
$sql = "DELETE FROM mailing_list WHERE id = ?";
$stmt = $mysqli->stmt_init();
$stmt->prepare($sql);
$stmt->bind_param("i", $id);
$stmt->execute();

$stmt->close();
$mysqli->close();

header("Location: /mailing/mailing_memberlist.php");
?>
